/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UT14_CargarPlanSolucion;

import Herramientas.Herramientas;
import Herramientas.RadioButtonEditor;
import Herramientas.RadioButtonRenderer;
import Herramientas.Visualizacion;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Matias
 */
public class UT14_1_3_NuevoProyectoSolucion extends javax.swing.JFrame {

    /**
     * Creates new form UT06_2_CargarSolucion
     */
    public UT14_1_3_NuevoProyectoSolucion() {
        Visualizacion.setVisual(this);
        initComponents();
        jMenu1.setText(Herramientas.getNombreParaPantalla(this) + jMenu1.getText());



        DefaultTableModel modelo = new DefaultTableModel();

        Object[] columnas = new Object[]{"Causa", "Seleccionar"};
        Object[][] obj1 = new Object[6][columnas.length];


        obj1[0][0] = "Promedio General";
        obj1[0][1] = new JRadioButton();
        JRadioButton jr = (JRadioButton) obj1[0][1];
        jr.setSelected(true);

        obj1[1][0] = "Costea Estudios";
        obj1[1][1] = new JRadioButton();


        obj1[2][0] = "Asistencias";
        obj1[2][1] = new JRadioButton();

        obj1[3][0] = "Título Secundario";
        obj1[3][1] = new JRadioButton();

        obj1[4][0] = "Viaja";
        obj1[4][1] = new JRadioButton();

        obj1[5][0] = "Años desde Ingreso";
        obj1[5][1] = new JRadioButton();


        modelo.setDataVector(obj1, columnas);

        jTable1.setModel(modelo);
        jTable1.getColumn("Seleccionar").setCellRenderer(new RadioButtonRenderer());
        jTable1.getColumn("Seleccionar").setCellEditor(new RadioButtonEditor(new JCheckBox()));

        /////////////////////////////
        /////////////////////////////
        /////////////////////////////
        /////////////////////////////

        modelo = new DefaultTableModel();

        columnas = new Object[]{"Recursos", "Seleccionar"};
        obj1 = new Object[5][columnas.length];


        obj1[0][0] = "Beca de Trabajo";
        obj1[0][1] = new JRadioButton();

        obj1[1][0] = "Beca de Estudio";
        obj1[1][1] = new JRadioButton();

        obj1[2][0] = "Asignar Tutor";
        obj1[2][1] = new JRadioButton();

        obj1[3][0] = "Curso de Apoyo";
        obj1[3][1] = new JRadioButton();
        jr = (JRadioButton) obj1[3][1];
        jr.setSelected(true);

        obj1[4][0] = "Capacitación Tecnicas de Estudio";
        obj1[4][1] = new JRadioButton();

        modelo.setDataVector(obj1, columnas);

        jTable2.setModel(modelo);
        jTable2.getColumn("Seleccionar").setCellRenderer(new RadioButtonRenderer());
        jTable2.getColumn("Seleccionar").setCellEditor(new RadioButtonEditor(new JCheckBox()));
        /////////////////////////////
        /////////////////////////////
        /////////////////////////////
        /////////////////////////////

        modelo = new DefaultTableModel();

        columnas = new Object[]{"Planificación", "Seleccionar"};
        obj1 = new Object[6][columnas.length];


        obj1[0][0] = "1 - 2 mes";
        obj1[0][1] = new JRadioButton();

        obj1[1][0] = "2 - 4 meses";
        obj1[1][1] = new JRadioButton();
        jr = (JRadioButton) obj1[1][1];
        jr.setSelected(true);

        obj1[2][0] = "4 - 6 meses";
        obj1[2][1] = new JRadioButton();

        obj1[3][0] = "6 - 8 meses";
        obj1[3][1] = new JRadioButton();

        obj1[4][0] = "8 - 10 meses";
        obj1[4][1] = new JRadioButton();
        
        obj1[5][0] = "10 - 12 meses";
        obj1[5][1] = new JRadioButton();

        modelo.setDataVector(obj1, columnas);

        jTable3.setModel(modelo);
        jTable3.getColumn("Seleccionar").setCellRenderer(new RadioButtonRenderer());
        jTable3.getColumn("Seleccionar").setCellEditor(new RadioButtonEditor(new JCheckBox()));

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jButton2 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jLabel3 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jLabel4 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();

        jButton1.setText("Otorgar");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Causas de Deserción:");

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Causa", "Objetivo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);
        jTable1.getColumnModel().getColumn(0).setResizable(false);
        jTable1.getColumnModel().getColumn(1).setResizable(false);

        jButton2.setText("Guardar Proyecto");

        jLabel2.setText("Recursos Soluciones:");

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "recursos", "Objetivo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jTable2);
        jTable2.getColumnModel().getColumn(0).setResizable(false);
        jTable2.getColumnModel().getColumn(1).setResizable(false);

        jLabel3.setText("Otra Causa de Deserción:");

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "tipo planificacion", "Objetivo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jTable3);
        jTable3.getColumnModel().getColumn(0).setResizable(false);
        jTable3.getColumnModel().getColumn(1).setResizable(false);

        jLabel4.setText("Tipo de Planificación:");

        jMenu1.setText("Nuevo Proyecto Solución");
        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jLabel4)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(95, 95, 95)
                                .addComponent(jButton2)))
                        .addContainerGap())))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton2)))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(UT14_1_3_NuevoProyectoSolucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(UT14_1_3_NuevoProyectoSolucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(UT14_1_3_NuevoProyectoSolucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(UT14_1_3_NuevoProyectoSolucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new UT14_1_3_NuevoProyectoSolucion().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable3;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables
}
